package com.lhb.SC.admin.feign.codec;

import org.springframework.stereotype.Service;

import feign.Response;
import feign.RetryableException;
import feign.codec.ErrorDecoder;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class MonitorErrorDecoder extends ErrorDecoder.Default{
	
	@Override
	public Exception decode(String methodKey, Response response) {
		Exception e = super.decode(methodKey, response);
		if(e instanceof RetryableException) {
		}else {
			log.info("methodKey:{},response:{}",methodKey,response);
		}
		return e;
	}

}
